	
        // 路径配置
        require.config({
            paths: {
                echarts: 'http://echarts.baidu.com/build/dist'
            }
        });
        // 使用
        require(
            [
                'echarts',
                'echarts/chart/map' ,// 使用地图就加载bar模块，按需加载
               
            ],
           
            function (ec) {
                // 基于准备好的dom，初始化echarts图表
                var myChart = ec.init(document.getElementById('main')); 
					 function randomData() {
				    return Math.round(Math.random()*1000);
				};
					function randomData() {
					    return Math.round(Math.random()*1000);
					}
									function randomData() {
					    return Math.round(Math.random()*1000);
					}
					
					option = {
					
					    tooltip: {
					        trigger: 'item'
					    },
					   dataRange: {
				        min: 500,
				        max: 3000,
				        text:['High','Low'],
				        realtime: false,
				        calculable : true,
				        color: ['orangered','yellow','lightskyblue']
				    },
				     legend: {
					        orient: 'vertical',
					        left: 'left',
					        data:['文章数量']
					    },
					   
					    visualMap: {
					        min: 2500,
					        max: 50000,
					        left: 'left',
					        top: 'bottom',
					        text: ['高','低'],           // 文本，默认为数值文本
					        calculable: true
					    },
					    toolbox: {
					        show: true,
					        orient: 'vertical',
					        left: 'right',
					        top: 'center',
					        feature: {
					            dataView: {readOnly: false},
					            restore: {},
					            saveAsImage: {}
					        }
					    },
					    series: [
					        {
					            name: '文章数量',
					            type: 'map',
					            mapType: 'china',
					            roam: false,
					            label: {
					                normal: {
					                    show: true
					                },
					                emphasis: {
					                    show: true
					                }
					            },
					              itemStyle:{
					                normal:{label:{show:true}},
					                emphasis:{label:{show:true}}
					            },  
//					            显示各个省份
					            data:[
					                {name: '北京',value: randomData() },
					                {name: '台湾',value: randomData() },
					                {name: '天津',value: randomData() },
					                {name: '上海',value: randomData() },
					                {name: '重庆',value: randomData() },
					                {name: '河北',value: randomData() },
					                {name: '河南',value: randomData() },
					                {name: '云南',value: randomData() },
					                {name: '辽宁',value: randomData() },
					                {name: '黑龙江',value: randomData() },
					                {name: '湖南',value: randomData() },
					                {name: '安徽',value: randomData() },
					                {name: '山东',value: randomData() },
					                {name: '新疆',value: randomData() },
					                {name: '江苏',value: randomData() },
					                {name: '浙江',value: randomData() },
					                {name: '江西',value: randomData() },
					                {name: '湖北',value: randomData() },
					                {name: '广西',value: randomData() },
					                {name: '甘肃',value: randomData() },
					                {name: '山西',value: randomData() },
					                {name: '内蒙古',value: randomData() },
					                {name: '陕西',value: randomData() },
					                {name: '吉林',value: randomData() },
					                {name: '福建',value: randomData() },
					                {name: '贵州',value: randomData() },
					                {name: '广东',value: randomData() },
					                {name: '青海',value: randomData() },
					                {name: '西藏',value: randomData() },
					                {name: '四川',value: randomData() },
					                {name: '宁夏',value: randomData() },
					                {name: '海南',value: randomData() },
					                {name: '台湾',value: randomData() },
					                {name: '香港',value: randomData() },
					                {name: '澳门',value: randomData() }
					            ]
					        },
					    ]
					};

                // 为echarts对象加载数据 
                myChart.setOption(option); 
            }
        );
    
